Skip to content

ci: add review-gate, OpenSSF Scorecard and Dependabot cooldown - #4

Merged
ricardofrantz merged 5 commits into
mainfrom
ci/review-gate-scorecard
Nov 14, 2026
Merged

ricardofrantz merged 5 commits into
mainfrom
ci/review-gate-scorecard

Conversation

@ricardofrantz

@ricardofrantz ricardofrantz commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Changes:

  • review-gate.yml (waits for the CodeRabbit and cubic check runs on the head commit; fails if cubic did not complete or CodeRabbit was off or errored; warns when CodeRabbit is rate limited or skips a later push after a finished review) and scorecard.yml (OpenSSF Scorecard, weekly, SARIF upload); permissions are least-privilege and every action is pinned to a full commit SHA, same files as machine-made/pi-effort

View guided diff

Summary by CodeRabbit

  • Workflow Updates
    • Pull requests now receive an automated review-status check, with results determining whether the check passes.
    • Security scorecard results are published to code scanning and retained as downloadable artifacts.

…tance

Changes:
- review-gate.yml (waits for the CodeRabbit and cubic check runs on the head commit; fails if cubic did not complete or CodeRabbit was off or errored; warns when CodeRabbit is rate limited or skips a later push after a finished review) and scorecard.yml (OpenSSF Scorecard, weekly, SARIF upload); permissions are least-privilege and every action is pinned to a full commit SHA, same files as machine-made/pi-effort

Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Adds two GitHub Actions workflows. One gates pull requests on CodeRabbit and cubic check results. The other runs Scorecard for configured events and uploads its SARIF results.

Changes: Pull-request review gate

Layer / File(s) Summary
Workflow triggers and job conditions
.github/workflows/review-gate.yml
The workflow handles selected pull-request events, cancels older runs for the same pull request, and skips drafts and Dependabot- or Renovate-authored pull requests.
Review check polling
.github/workflows/review-gate.yml
The workflow polls CodeRabbit and cubic checks on the pull request head commit. It also searches earlier pull request commits for a successful CodeRabbit Finished review.
Review gate outcomes
.github/workflows/review-gate.yml
The workflow applies check title and conclusion rules. It fails, warns, or emits a notice according to the results.

Scorecard workflow

Layer / File(s) Summary
Scorecard generation and publishing
.github/workflows/scorecard.yml
The workflow runs Scorecard for configured events, saves results.sarif as an artifact for five days, and uploads it to code scanning.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Other

Merge Risk: Minimal · up to 7e639

This change adds a CI review gate and a weekly Scorecard workflow. It does not touch application code. No concrete defect was found, and the workflows can be reverted easily if they misbehave.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names three changes: review-gate workflow, OpenSSF Scorecard workflow, and Dependabot cooldown. The raw summary covers review-gate.yml and scorecard.yml, which matches the first two items. I…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names three changes: review-gate workflow, OpenSSF Scorecard workflow, and Dependabot cooldown. The raw summary covers review-gate.yml and scorecard.yml, which matches the first two items. It does not mention any Dependabot cooldown change, so that part of the title is not supported by the summarized files. The title is specific and conveys the main changes, so it passes despite the unsupported Dependabot item.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
Simplify code

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e544776d-5cb0-4fb9-a040-7d0a0877b927
Commits

Reviewing files that changed from the base of the PR and between c055fa9 and 7e639f0.

Files selected for processing: 2

  • .github/workflows/review-gate.yml
  • .github/workflows/scorecard.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread .github/workflows/review-gate.yml Resolved
jac-made Bot and others added 4 commits November 14, 2026 00:32
… requires success for Finished

Commit listing follows pagination; the last poll no longer sleeps; a Finished title needs a success conclusion and stale is rejected; gh errors reach the log.

Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>
gh api prints the HTTP error body to stdout, so the fallback value was appended to it and the count test could pass; the value is now replaced on failure.

Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>
…effort 479a885)

Commit listing paginated, gh error bodies no longer pass the review count, Finished needs success, CodeRabbit lookup filtered by check name, documented skip titles accepted, re-run hint, 15 min Scorecard timeout.

Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>
A failed commit listing gets its own error, a PR-scoped concurrency group cancels superseded gate runs, the historical lookup reads all check attempts, the failure message asks for a full review, and a manual Scorecard run on a non-default branch is skipped.

Co-authored-by: Ricardo Frantz <4220623+ricardofrantz@users.noreply.github.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/review-gate.yml">

<violation number="1" location=".github/workflows/review-gate.yml:52">
P3: This request reads only one page of 100 runs, so it can miss a successful `Finished` check after enough retries and reject the skip. Paginate the lookup before counting.</violation>
</file>

Reply with feedback, questions, or to request a fix.

View guided diff | Re-trigger cubic

Comment thread .github/workflows/review-gate.yml Resolved
@ricardofrantz
ricardofrantz merged commit ed0aefb into main Nov 14, 2026
5 checks passed
@ricardofrantz
ricardofrantz deleted the ci/review-gate-scorecard branch November 14, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant